package com.youmingxing.bean;

import org.json.JSONObject;

/**
 * @author evilyin(ChenZhixi)
 * @since 15/10/8
 */
public class AuditionDetail {
    public int movieID;
    public int cateID;
    public int quota;
    public int gender;
    public int ageMin;
    public int ageMax;
    public String intro;
    public int auditionStatus;
    public long beginOrEndTime;
    public String cate_bg_img;
    public String status_tip;
    public boolean my_apply;
    public String img; //方图
    public String cate_name;
    public String title;

    public AuditionDetail(JSONObject data) {
        movieID = data.optInt("movie_id");
        cateID = data.optInt("cate_id");
        quota = data.optInt("quota");
        gender = data.optInt("gender");
        ageMin = data.optInt("age_min");
        ageMax = data.optInt("age_max");
        intro = data.optString("intro");
        auditionStatus = data.optInt("audition_status");
        beginOrEndTime = data.optLong("begin_or_end_time");
        status_tip = data.optString("status_tip", "");
        cate_bg_img = data.optString("cate_bg_img");
        my_apply = data.optBoolean("my_apply");
        img = data.optString("img");
        cate_name = data.optString("cate_name");
        title = data.optString("title");
    }

    public int getMovieID() {
        return movieID;
    }

    public int getCateID() {
        return cateID;
    }

    public int getQuota() {
        return quota;
    }

    public String getGender() {
        switch (gender) {
            case 0:
                return "男女不限";
            case 1:
                return "限男生";
            case 2:
                return "限女生";
            default:
                return "未知";
        }
    }

    public String getAge() {
        return ageMin + "-" + ageMax + "岁";
    }

    public String getIntro() {
        return intro;
    }

    public int getAuditionStatus() {
        return auditionStatus;
    }

    public long getBeginOrEndTime() {
        return beginOrEndTime;
    }
}
